package com.gator.desig_mode.state;

/**
 * @author 何章怀晓 hezhanghuaixiao
 * @version V1.0
 * @desc
 */
public class RaffleActivte {

  private State state = null;

  public RaffleActivte() {
    this.state = getNoRaffleState();
  }

  private State canRaffleState = new CanRaffleState(this);
  private State dispenseState = new DispenseState(this);
  private State dispenseOutState1 = new DispenseOutState(this);
  private State noRaffleState = new NoRaffleState(this);

  //开始
  public void start() {
    state.deductMoney();
  }

  //抽奖
  public void raffle() {
    boolean reffle = state.reffle();
    if (reffle) {
      state.dispensePrize();
    } else {

    }

  }


  public State getState() {
    return state;
  }

  public void setState(State state) {
    this.state = state;
   }

  public State getCanRaffleState() {
    return canRaffleState;
  }

  public State getDispenseState() {
    return dispenseState;
  }

  public State getDispenseOutState1() {
    return dispenseOutState1;
  }

  public State getNoRaffleState() {
    return noRaffleState;
  }
}
